<template>
	<view class="box" @click="hhh">
		<view class="top-nav">
			<u-navbar height="50" back-icon-color="#333" title="确认订单" :border-bottom="false" title-color="#333"
				title-size="36">
			</u-navbar>
		</view>
		<view class="top">

		</view>
		<!-- tab栏 -->
		<view class="tabs">
			<u-tabs :list="tabs" active-color="#ff553d" :is-scroll="false" v-model="current"
				@change="change"></u-tabs>
			<view class="business_ct ct" v-if="current==0">
				<view class="addressData" v-if="addressId" @click="onShowAddress()">
					<view class="addressCt">
						<view class="dwicon">

						</view>
						<view class="address_ct">
							{{addressInfo.address}}
						</view>
						<view class="arrowicon">

						</view>
					</view>
					<view class="userInfo">
						<span class="nickName">{{addressInfo.contact_person}}</span> <span
							class="phone">{{addressInfo.contact_phone}}</span>
					</view>
				</view>
				<view class="addressAdd" v-else @click="onNewAddress()">+点击添加地址</view>
			</view>
			<view class="selef_ct ct" v-if="current==1">
				<view class="addressData" v-if="chain_addressInfo">
					<view class="addressCt">
						<view class="address_ct">
							{{chain_addressInfo.chain_name}}
						</view>
						<view class="chain_phone">
							{{chain_addressInfo.chain_phone}}
						</view>
					</view>
					<view class="addressCt" @click="()=>this.shopshow=true">
						<view class="dwicon">

						</view>
						<view class="address_ct">
							{{chain_addressInfo.area_info}}
						</view>
						<view class="arrowicon">
						</view>
					</view>
				</view>
				<view class="addressAdd" v-else @click="()=>this.shopshow=true">请选择门店</view>

			</view>
		</view>

		<view class="userInfo" v-if="current==1">
			<view class="title">
				自提信息
			</view>
			<view class="user">
				<view class="name">
					<span>姓名:</span><input type="text" v-model="userInfo.name" placeholder="请输入联系人名字" />
				</view>
				<view class="phone">
					<span>电话:</span><input type="number" v-model="userInfo.phone" placeholder="请输入电话号码" />
				</view>
			</view>

		</view>
		<!-- 商品全部信息 -->
		<view class="goodsInfo" v-for="(item,index) in goodsInfo" :key="item.id">
			<view class="businessInfo">

				<view class="name">
					{{item.dpName}}
				</view>
			</view>
			<!-- 商品信息 -->
			<view class="goodsItem_box">
				<view class="item">
					<view class="left">
						<image :src="item.image" mode=""></image>
					</view>
					<view class="right">
						<view class="goodsName">
							{{item.name}}
						</view>
						<view class="type" v-if="item.type">
							类型:{{item.type}}
						</view>

						<view class="total_price">
							<view class="price">
								￥<span class="ct">{{item.price}}</span>
							</view>
							<u-number-box v-model="goodsInfo[index].count" @change="valChange"></u-number-box>
						</view>
					</view>
				</view>
			</view>
			<!-- 价格信息 -->
			<view class="PriceInfo">
				<view class="total_price">
					<span>商品总价 </span> <span>￥{{totalPrice}}</span>
				</view>
				<view class="cupons_price" @click="()=>this.showCupons = true">
					<view class="title">
						<span> 优惠券抵扣 </span>
					</view>
					<view class="ct" style="display: flex; align-items: center;">
						<span style="color: #FA453C;">-￥{{cuponsPrice}}</span> <span class="icon"></span>
					</view>
				</view>
				<view class="send_price" v-if="current==0">
					<span>配送费</span> <span style="color: #FA453C;">+￥{{sendPrice}}</span>
				</view>
				<view class="computer_price">
					<span style="font-size: 32rpx; font-weight: 700;">￥{{computerPrices}}</span> <span>合计：</span>
					<span>共{{goodsInfo.length}}商品</span>
				</view>
			</view>
		</view>
		<!-- 订单备注 -->
		<view class="remark">
			<view class="title">
				订单备注（选填）
			</view>
			<view class="ct_area">
				<textarea placeholder="请输入备注信息" style="height: 120rpx;" v-model="remark" />
			</view>
		</view>
		<!-- 提交 -->
		<view class="submit">
			<view class="subCt">
				<span>实付</span><span class="price">￥{{current==0?`${computerPrices}`:`${zitiPrice}`}}</span>
			</view>
			<view class="subBtn" @click="()=>this.show = true">
				提交订单
			</view>
		</view>
		<!-- 门店列表 -->
		<u-popup v-model="shopshow" mode="bottom" border-radius="10" height="500">
			<view class="radio-group">
				<u-radio-group v-model="value">
					<u-radio @change="radioGroupShopChange(item)" v-for="(item, index) in chain_list" :key="index"
						:name="item.chain_id">
						<view class="shopItem">
							<view>{{item.chain_name + '(' + item.chain_opening_hours+ ')'}}</view>
							<view class="subaddress">{{item.area_info}} <span
									v-if="item.chain_address">{{item.chain_address}}</span></view>
						</view>
					</u-radio>
				</u-radio-group>
			</view>
		</u-popup>
		<!-- 支付方式 -->
		<u-popup v-model="show" mode="bottom" :closeable="true" border-radius="28">
			<view class="popBox">
				<view class="total_price">
					<span class="icon">￥</span>{{current==0?`${computerPrices}`:`${zitiPrice}`}}
				</view>
				<view class="payItemView">
					<view class="payTypeTitme">请选择支付方式</view>
					<view class="payTypeItem" @click="onSelecteds(1)">
						<view class="left">
							<u-icon name="/static/weixin.png" size="50"></u-icon>
							<view class="payTypeTitle">微信支付</view>
						</view>

						<view class="right">
							<u-icon name="/static/selected.png" size="40" v-if="currents == 1"></u-icon>
							<u-icon name="/static/unselected2.png" size="40" v-else></u-icon>
						</view>
					</view>
					<view class="payTypeItem" @click="onSelecteds(2)">
						<view class="left">
							<u-icon name="/static/icons/dfk.png" size="50"></u-icon>
							<view class="payTypeTitle">余额支付</view>
						</view>
					
						<view class="right">
							<u-icon name="/static/selected.png" size="40" v-if="currents == 2"></u-icon>
							<u-icon name="/static/unselected2.png" size="40" v-else></u-icon>
						</view>
					</view>
				</view>
				<view class="pay" @click="onOrderPayment">
					立即支付
				</view>
			</view>
		</u-popup>
		<u-popup v-model="showCupons" mode="bottom" :closeable="true" border-radius="28">
			<view class="popCupons">
				<view class="title">
					优惠券折扣券
				</view>
				<view class="cupons_items" v-for="item in couponsList" :key="item.id">
					<view class="item">
						<view class="top_dot">
						</view>
						<view class="left">
							<view class="price">
								<span class="icon">￥</span><span class="num">{{Math.floor(item.coupon_amount)}}</span>
							</view>
							<view class="type_name">
								{{item.coupon_name}}
							</view>
						</view>
						<view class="right">
							<view class="type_cupons" >
								<view class="btn" @click="getCOupon(item.id)" v-if="item.is_use==0">
									选择
								</view>
								<view class="btn" v-else>
									已使用
								</view>
							</view>
							<view class="toTime">
								有效期：{{item.created_at}}至{{item.expire_time}}
							</view>
						</view>
						<view class="bottom_dot">
						</view>
					</view>
				</view>
			</view>
		</u-popup>
		<addressPopup ref="address" @select="onSelected" @edit="onEditAddress" @add="onNewAddress"></addressPopup>
	</view>
</template>
<script>
	import {
		// 默认收货地址
		getDefaultAddresses,
		// 创建商品订单post
		addOrder,
		// 优惠券
		getMyCoupons,
		// 门店
		getStorechain

	} from '@/api/user.js'
	import {
		// 秒杀商品详情
		getSeckillId,
		// 提交秒杀商品
		submitSeckillId
	} from '/api/product.js'
	import addressPopup from "@/components/address-popup.vue"
	import toast from "../../uni_modules/vk-uview-ui/libs/function/toast.js";
	import config from '@/config/config.js'
	export default {
		components: {
			addressPopup
		},
		data() {
			return {
				tabs: [{
					name: '配送'
				}, {
					name: '自提'
				}],
				//设置tab下标
				current: 0,
				//商品信息
				goodsInfo: [],
				//下拉框的标识
				optionId: 3,
				//总价
				totalPrice: '0',
				//优惠券
				cuponsPrice: '0',
				//配送费
				sendPrice: '0',
				//提交订单的价格
				computerPrices: '0',
				//自提价格
				zitiPrice: '0',
				//备注
				remark: '',
				// 支付方式
				currents: '',
				//支付显示框
				show: false,
				style: {},
				// 收货地址
				addressInfo: '',
				// 收货地址id
				addressId: "",
				// 门店地址
				chain_addressInfo: "",
				//门店id
				chain_id: "",
				// 门店列表
				chain_list: "",
				//打开门店
				shopshow: false,
				// 第几个门店
				value: 0,
				// 自提点id
				zitiId: "",
				showCupons:false,
				couponsList:[],
				// 自提人信息
				userInfo: {
					name: "",
					phone: ""
				},
				couponsId:""


			}
		},
		onPageScroll(e) {
			if (e.scrollTop > 157) {
				this.style = {
					background: '#ff553d'
				}
			} else {
				this.style = {
					background: 'transparent'
				}
			}
		},
		onLoad(res) {

			console.log("查看信息", JSON.parse(res.goods));
			this.goodsInfo = JSON.parse(res.goods)

			this.computerPrice()
		},
		onShow() {
			this.initData()
		},
		methods: {
			initData() {
				getDefaultAddresses().then((res) => {
					console.log("默认地址数据", res)
					if (res.data) {
						this.addressInfo = res.data;
						this.addressId = res.data.id;
					}
				})

				getMyCoupons().then((res) => {
					console.log("我的优惠券数据", res)
					let arr = res.data.map(item=>{
						return item.member_coupon
					})
					this.couponsList = this.flattenArray(arr)
					console.log('优惠券',this.couponsList);
				})
				getStorechain({
					id: this.goodsInfo[0].store_id
				}).then((res) => {
					console.log("我的门店数据", res)
					if (res.data) {
						this.chain_list = res.data;
					}
				})
			},
			flattenArray(arr) {
				// 使用reduce和concat来扁平化数组  
				return arr.reduce((flat, toFlatten) => {
					return flat.concat(Array.isArray(toFlatten) ? this.flattenArray(toFlatten) : toFlatten);
				}, []);
			},
			change(index) {
				this.current = index
			},
			//商品数量
			valChange(index) {
				console.log("hhh", index);
				this.computerPrice()

			},
			//打开指定的下拉框
			selectType(id) {
				if (this.optionId == id) {
					this.optionId = 3
					return
				}
				this.optionId = id
			},
			//点击取消下拉框(规格)
			hhh() {
				this.optionId = 3
			},
			getCOupon(id){
				let index = this.couponsList.findIndex(item=>item.id==id)
				if(index!=-1){
					if(this.totalPrice<this.couponsList[index].coupon_amount){
						this.showCupons = false
						toast("该优惠券不能使用")
						return
					}
					this.cuponsPrice = this.couponsList[index].coupon_amount
					
					this.couponsId = id
					console.log(this.cuponsPrice,this.couponsId);
				}else{
					toast("优惠券不存在")
				}
				this.computerPrice()
				this.showCupons = false
			},
			//选择指定的内容
			selectOptValue(c, index) {
				console.log(c);
				this.goodsInfo[index].selectType = c
				this.optionId = 3
			},
			// 打开所有地址
			onShowAddress() {
				this.$refs.address.open();
			},
			//计算总价
			computerPrice() {
				let total = 0
				for (let i = 0; i < this.goodsInfo.length; i++) {
					total += Number(this.goodsInfo[i].price) * Number(this.goodsInfo[i].count)
				}
				this.totalPrice = total
				this.computerPrices = (this.totalPrice - Number(this.cuponsPrice) + Number(this.sendPrice)).toFixed(2)
				this.zitiPrice = (this.totalPrice + Number(this.sendPrice)).toFixed(2)
				console.log(total, this.computerPrices, this.cuponsPrice, this.sendPrice);
			},
			//选择支付方式
			onSelecteds(i) {
				this.currents = i
			},
			onOrderPayment() {
				let info = this.goodsInfo[0]
				console.log(info);

				if (this.current == 0) {
					if (this.goodsInfo.length == 0) {
						toast('未获取到商品信息')
						return
					}
					if (this.addressId == '' || this.addressId == null) {
						toast('请选择收货地址')
						return
					}
					if(!this.currents){
						toast("请选择支付方式")
						return
					}
					let obj = {
						goods_id: info.id,
						goods_number: info.count,
						delivery_address_id: this.addressId,
						remark: this.remark,
						express_fee: info.freight_price,
						member_coupon_id: this.couponsId,
						type: this.current+1,
						chain_id:0,
						goods_sku_id:this.goodsInfo[0].typeId,
					}

					console.log('查看', obj);
					addOrder(obj).then(res => {
						uni.redirectTo({
							url: '/pages/payment/payment?order_no=' +
								res.data.order_no + '&money=' + this.computerPrices+'&current='+this.currents
						});
					})
				}
				if (this.current == 1) {
					let self = this;
					if (self.goodsInfo.length == 0) {
						toast('未获取到商品信息')
						return
					}
					if (self.zitiId == '') {
						toast('请选择自提门店')
						return
					}
					if (!self.userInfo.name.toString()) {
						toast('请输入真实姓名')
						return
					}
					if (!self.userInfo.phone.toString()) {
						toast('请输入电话号码')
						return
					}
					if (self.userInfo.phone.toString().length != 11) {
						toast('请输入正确的电话号码')
						return
					}
					if(!this.currents){
						toast("请选择支付方式")
						return
					}

					let obj = {
						type: this.current+1,
						goods_id: info.id,
						goods_number: info.count,
						delivery_address_id: this.addressId,
						remark: this.remark,
						express_fee: info.freight_price,
						// member_coupon_id: this.couponId == 0 ? '' : this.couponId,
						chain_id: this.zitiId,
						name: this.userInfo.name,
						phone: this.userInfo.phone,
					}
					console.log('查看', obj);

					addOrder(obj).then(res => {
						console.log("数据", res);
						uni.redirectTo({
							url: '/pages/payment/payment?order_no=' +
								res.data.order_no + '&money=' + this.computerPrices+'&current='+this.currents
						});
					})
				}
			},
			miniPayment() {
				let self = this;
				self.$user.orderMiniPayment({
					order_no: this.orderNo,
				}, true).then(res => {
					self.onPayment("wxpay", res.data.pay_params);
				});
			},
			onPayment(provider, orderInfo) {
				let self = this;
				self.$utils.pay(provider, orderInfo, (res) => {
					self.$utils.tips('支付成功');
					setTimeout(function() {
						uni.navigateBack({
							delta: 1
						});
					}, 1500);
				}, (res) => {
					self.$utils.tips('支付失败');
				}, (res) => {
					console.log("==============" + JSON.stringify(res, null, 2));
				});
			},
			// 选择地址,添加,编辑
			onNewAddress() {
				// this.$utils.jump('/other/add-address/add-address?type=0');
				uni.navigateTo({
					url: '/other/add-address/add-address?type=0'
				})
			},
			onSelected(item) {
				this.addressInfo = item;
				this.addressId = item.id;
			},
			onEditAddress(item) {
				// this.$utils.jump(');
				uni.navigateTo({
					url: '/other/add-address/add-address?type=1&id=' + item.id
				})
			},
			// 选择门店
			radioGroupShopChange(item) {
				console.log("门店信息", item);
				this.chain_addressInfo = item
				this.zitiId = item.chain_id
				this.addressId = item.area_id
			}
		}
	}
</script>
<style>
	@import url('order-confirm.css');

	page {
		background: #f5f5f5;
	}
</style>
<style lang="scss" scoped>
	.box {
		position: relative;
		background-color: #f5f5f5;
		width: 100vw;

		.top {
			width: 750rpx;
			height: 398rpx;
		}

		.bg {
			position: absolute;
			top: 0;
			left: 0;

			image {
				width: 750rpx;
				height: 398rpx
			}
		}
	}

	// tab选项
	.tabs {
		position: absolute;
		width: 710rpx;
		left: 20rpx;
		top: 170rpx;
		height: 340rpx;
		border-radius: 18rpx;
		overflow: hidden;

		.tabBox {
			display: flex;
			align-items: flex-end;
			font-size: 32rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #333333;

			.tab {
				width: 355rpx;
				text-align: center;
				height: 60rpx;
				line-height: 60rpx;
				border-top-right-radius: 18rpx;
				border-top-left-radius: 18rpx;
				background-color: rgba(255, 255, 255, 0.4);
			}

			.tab.active {
				height: 80rpx;
				border-top-left-radius: 18rpx;
				border-top-right-radius: 18rpx;
				line-height: 80rpx;
				background-color: #ff553d;
			}
		}

		.ct {
			background-color: #ffffff;
			margin-top: -1rpx;
			box-sizing: border-box;
			padding: 30rpx 20rpx;
			height: 340rpx;

			.addressCt {
				display: flex;
				align-items: flex-start;

				.dwicon {
					margin: 14rpx 18rpx 0 0;
					width: 32rpx;
					height: 32rpx;
					background-image: url('/static/img/dw1.png');
					background-size: 32rpx 32rpx;
					background-repeat: no-repeat;
				}

				.address_ct {
					width: 580rpx;
					font-size: 32rpx;
					height: 120rpx;
					line-height: 60rpx;
					font-weight: 400;
					color: #333333;
				}

				.arrowicon {
					margin: 14rpx 0 0 18rpx;
					width: 32rpx;
					height: 32rpx;
					background-image: url('/static/img/arrow.png');
					background-size: cover;
					background-repeat: no-repeat;
				}
			}

			.userInfo {
				font-size: 28rpx;
				font-weight: 400;
				color: #333333;

				.nickName {
					margin-right: 20rpx;
				}
			}


		}

	}

	.userInfo {
		width: 710rpx;
		height: 200rpx;
		box-sizing: border-box;
		padding: 20rpx;
		background-color: #fff;
		margin: 20rpx auto;
		border-radius: 20rpx;

		.title {
			font-size: 36rpx;
			color: #333333FF;
		}

		.user .name {
			display: flex;
			height: 50rpx;
			padding: 20rpx 0;
		}

		.user .phone {
			height: 50rpx;
			display: flex;
			margin: 10rpx 0;
			padding: 20rpx 0;
		}
	}

	// 商品信息
	.goodsInfo {
		width: 710rpx;
		box-sizing: border-box;
		padding: 30rpx 20rpx;
		margin: 40rpx auto;
		border-radius: 18rpx;
		background-color: #ffffff;
		font-family: SourceHanSansCN-Regular;

		.businessInfo {
			display: flex;
			align-items: center;

			.pic {
				border-radius: 12rpx;
				overflow: hidden;

			}

			.pic image {
				width: 60rpx;
				height: 67rpx;
			}

			.name {
				font-size: 30rpx;
				font-weight: 400;
				color: #333333;
				margin-left: 20rpx;
			}
		}

		//商品信息
		.goodsItem_box {
			margin-top: 30rpx;
			padding: 0 0 20rpx 0;
			border-bottom: 1rpx solid #f0f1f2;

			.item {
				display: flex;
				margin-top: 20rpx;

			}

			.item .left {
				width: 160rpx;
				height: 160rpx;
				border-radius: 18rpx;
				overflow: hidden;
				margin-right: 20rpx;
			}

			.item .left image {
				width: 160rpx;
				height: 160rpx;
			}

			.item .right {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
			}

			.item .right .goodsName {
				width: 480rpx;
				font-size: 26rpx;
				font-weight: 400;
				color: #333333;
				margin-bottom: 20rpx;
			}
			.item .right .type{
				width: 480rpx;
				font-size: 22rpx;
				font-weight: 400;
				color: #666;
				margin-bottom: 20rpx;
				text-overflow: ellipsis;
				overflow: hidden;
				white-space: nowrap;
			}

			.item .right .total_price {
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin-top: 20rpx;
				font-size: 20rpx;
				color: #FA453C;

				.ct {
					font-size: 36rpx;
				}
			}

			.item .right .select {
				width: 116rpx;
				height: 40rpx;
				background: #F5F5F5;
				border-radius: 20rpx;
				line-height: 40rpx;
				text-align: center;
				font-size: 24rpx;
				color: #666;
				position: relative;
			}

			.types {
				display: flex;
				align-items: center;
				justify-content: center;
			}

			.item .right .select .types .icon {
				display: inline-block;
				width: 20rpx;
				height: 20rpx;
				background-image: url('/static/向下.png');
				background-size: cover;
				background-repeat: no-repeat;
			}

			.typeCt {
				height: 0rpx;
				background-color: #333333;
				color: white;
				overflow: hidden;
				position: absolute;
				top: 40rpx;
				left: 10rpx;
			}

			.typeCt.active {
				border-radius: 10rpx;
				background-color: #ff553d;
				text-align: center;
				width: 100rpx;
				height: 120rpx;
				transition: all linear 0.5s;
				z-index: 999;
			}
		}


	}

	//价格信息
	.PriceInfo {
		.cupons_price .icon {
			display: inline-block;
			width: 28rpx;
			height: 28rpx;
			background-image: url('/static/img/arrow.png');
			background-size: cover;
			background-repeat: no-repeat;
			margin: 0 0 0 8rpx;
		}

		.cupons_price,
		.send_price,
		.total_price {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 16rpx 0;
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #333333;
			border-bottom: 1px solid #f0f1f2;
		}

		.computer_price {
			display: flex;
			flex-direction: row-reverse;
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			align-items: center;
			font-weight: 400;
			color: #333333;
			margin-top: 10rpx;
			padding-top: 10rpx;

			span {
				margin-right: 12rpx;
			}
		}

	}

	//备注
	.remark {
		width: 710rpx;
		margin: 0 auto;
		box-sizing: border-box;
		padding: 30rpx 20rpx;
		border-radius: 28rpx;
		background-color: #fff;

		.title {
			font-size: 28rpx;
			font-family: Source Han Sans CN;
			font-weight: 400;
			color: #333333;
		}

		.ct_area {
			margin-top: 20rpx;
		}
	}

	// 提交
	.submit {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 750rpx;
		box-sizing: border-box;
		height: 96rpx;
		background: #FFFFFF;
		box-shadow: 0rpx 1rpx 10rpx 0rpx rgba(153, 153, 153, 0.2);
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 30rpx;
		padding: 15rpx 40rpx;
		font-family: Source Han Sans CN;
		font-weight: 400;
		color: #333333;
		z-index: 99;

		.subCt .price {
			color: #FA453C;
			font-size: 36rpx;
		}

		.subBtn {
			width: 200rpx;
			height: 70rpx;
			background: #ff553d;
			border-radius: 35rpx;
			text-align: center;
			line-height: 70rpx;
			color: #fff;
		}

	}

	// 支付方式
	.popBox {
		width: 750rpx;
		box-sizing: border-box;
		padding: 30rpx 20rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 0rpx 0rpx;
		height: 720rpx;
		position: relative;

		.total_price {
			margin-top: 40rpx;
			text-align: center;
			font-size: 56rpx;
			font-family: Source Han Sans CN;
			font-weight: 500;
			color: #333333;

			.icon {
				font-size: 36rpx;
			}
		}

		.pay {
			position: absolute;
			bottom: 40rpx;
			left: 30rpx;
			width: 690rpx;
			height: 80rpx;
			background: #ff553d;
			border-radius: 40rpx;
			text-align: center;
			line-height: 80rpx;
			color: #fff;
		}

	}
	//更多优惠券
	.popCupons {
		font-family: Source Han Sans CN;
		width: 750rpx;
		height: 750rpx;
		box-sizing: border-box;
		background-color: #fff;
	
		.title {
			padding: 0 20rpx;
			box-sizing: border-box;
			background-color: #f5f5f5;
			height: 100rpx;
			line-height: 100rpx;
			font-weight: 400;
			color: #333333;
			font-size: 28rpx;
		}
	
		.cupons_items {
			width: 750rpx;
			box-sizing: border-box;
			padding: 10rpx 20rpx;
	
			.item {
				display: flex;
				box-sizing: border-box;
				overflow: hidden;
				margin-top: 20rpx;
				position: relative;
			}
	
			.bottom_dot {
				position: absolute;
				width: 32rpx;
				height: 32rpx;
				bottom: -16rpx;
				left: 116rpx;
				background-color: #fff;
				border-radius: 50%;
			}
	
			.top_dot {
				position: absolute;
				width: 32rpx;
				height: 32rpx;
				top: -16rpx;
				left: 116rpx;
				border-radius: 50%;
				background-color: #fff;
			}
	
			.item .left {
				display: flex;
				flex-direction: column;
				align-items: center;
				width: 130rpx;
				height: 160rpx;
				background: #E7F5E6;
				border-radius: 8rpx;
				font-weight: 400;
				color: #ff553d;
	
				.price {
					font-size: 56rpx;
					font-weight: 400;
					line-height: 100rpx;
					color: #ff553d;
					font-weight: 700;
					position: relative;
				}
	
				.price .icon {
					font-weight: 200;
					font-size: 36rpx;
				}
	
				.price .num {
					margin-left: 20rpx;
				}
	
				.type_name {
					font-size: 24rpx;
					line-height: 30rpx;
				}
			}
	
			.item .right {
				width: 580rpx;
				height: 160rpx;
				background: #F5F5F5;
				border-radius: 8rpx;
				box-sizing: border-box;
				padding: 10rpx 20rpx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
	
				.type_title {
					font-size: 30rpx;
					font-weight: 400;
					color: #333333;
				}
	
				.type_cupons {
					display: flex;
					flex-direction: row-reverse;
					
				}
				.type_cupons .btn{
					min-width: 80rpx;
					padding: 10rpx 15rpx;
					border-radius: 15rpx;
					background-color: #FA453C;
					color: #fff;
					margin-top: 10rpx;
					text-align: center;
				}
	
				.type_cupons .dp {
					width: 96rpx;
					line-height: 40rpx;
					height: 40rpx;
					border-radius: 20rpx;
					border: 1px solid #ff553d;
					color: #ff553d;
					font-size: 20rpx;
				}
	
				.type_cupons .lq {
					width: 96rpx;
					height: 48rpx;
					line-height: 48rpx;
					font-size: 26rpx;
					background: #ff553d;
					border-radius: 23rpx;
					color: #fff;
				}
	
				.toTime {
					margin-top: 10rpx;
					font-size: 20rpx;
					font-weight: 400;
					color: #999999;
				}
	
	
			}
		}
	
	}
</style>